home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The 640 MEG Shareware Studio 5
/
The 640 Meg Shareware Studio CD-ROM Volume V (Data Express)(1994).ISO
/
amiga
/
d_bcps26.lha
/
BIG_CPS_Speed
next >
Wrap
Text File
|
1994-02-19
|
10KB
|
137 lines
/**************************************************************************\
"BIG_CPS_Speed", v2.6 written for CNet Amiga, v3.0P by Dotoran!
$VER: BIG CPS-Speed, v2.6 (20-Feb-94) by Dotoran!
\**************************************************************************/
options results ; signal on ERROR ; signal on SYNTAX ; signal on IOERR
tr=transmit ; se=sendstring ; gc=getchar ; qu=query ; gu=getuser
/********************-SysOp-Definable-Variables-**(See-the-README!-file)***/
c1 = 6 /* d - Color of Top Text Line("The average rate...). */
c2 = 9 /* f - Color or Mid Text Line(Varies w/ CPS Rate) & ALL Colons. */
c3 = 6 /* 6 - Color of Low Text Line("Record for this...). */
c4 = f /* 9 - Color of ("You broke the record...") Text. */
c5 = d /* e - Color of the BIG Numbers, Small CPS's & UD Keyword. */
c6 = 5 /* b - Color of the BIG CPS. */
c7 = e /* 9 - Color of Little % Numbers. */
c8 = a /* b - Color of Record CPS Numbers & Handles. */
c9 = x /* f - Color of Actual CPS Number & % Sign("x" = Use BAR Color) */
c10 = b /* a - Color of c7 Percent Signs & Record Dates. */
c11 = c /* 8 - Color of the Grid CPS BAR Travels Across. */
c12 = a /* 6 - Color of 0-25% CPS Bar Segment. */
c13 = 3 /* e - Color of 25-50% CPS Bar Segment. These Values */
c14 = b /* 3 - Color of 50-75% CPS Bar Segment. Should Be Any */
c15 = 1 /* b - Color of 75-100% CPS Bar Segment. Valid MCI Code! */
c16 = 9 /* 9 - Color of 100-125% CPS Bar Segment. */
t1 = 0 /* 0 - Test Mode (0=Off;Use With BBS, 1=On;Test Colors) */
t2 = 0 /* 0 - Test Mode2 (Only if t1=1; 0=Use ANSI, 1=Use ASCII) */
v1 = 7 /* 7 - Reset CPS File(s) After THIS MANY DAYS (From 0 to 30) */
v2 = 50 /* 50- Minimum SIZE (in KB) before CPS Rate will be used. */
v3 = 1 /* 1 - Use Separate UL/DL High CPS Files? (1=Yes, 0=No) */
v4 = 0 /* 1 - Use Segmented Box, or Open Box? (1=Segmented, 0=Open). */
v5 = 1307358 /* ONLY Modify V5 if told to do so by DOTORAN. */
/**************************************************************************/
gu 24 ; baud=result ; gu 1 ; handle=result ; t=time('s') ; line.='c'c5
gu 28 ; term=result ; gu v5 ; lc=left(upper(result),1) ; cps=0 ; up=0 ; dn=0
file1='sysdata:log/uloads' ; file2='sysdata:log/dloads' ; date=date('s')
dateL=date('m',date,'s')||' '||right(date,2)||', 'left(date,4)
if t1=1 then do ; cps=random(480,1440,t) ; lc='U' ; baud=960 ; end
if t1=1 & t2=0 then term=2 ; if t1=1 & t2=1 then term=1
wd=word('Upload Download',index('UD',lc)) ; if v3=0 then wd='Transfer'
if term>1 then call ANSI ; else call ASCII
path='pfiles:CPS/' ; file=path||baud ; if v3=1 then file=file||lc
if ~exists(path) then tr '$omakedir pfiles:CPS}'
if ~exists(file) then do ; call open(f1,file,'w')
call writeln(f1,'0|Dotoran|'date'|x') ; call close(f1) ; end
call open(f1,file,'r') ; r=readln(f1) ; call close(f1)
parse var r hi'|'who'|'date1'|'j
date2=date1+v1 ; if date>date2 then hi=0 ; if t1=0 then do
if lc='D' then call GETDOWNCPS ; else call GETUPCPS ; end
dateR=date('m',date1,'s')||' '||right(date1,2)||', 'left(date1,4)
if cps=0 then exit ; else do ; rate=((CPS/baud)*100)%1 ; r=rate%10 ; end
sp.1='Horrible. Why did you even bother?' ; sp.2='Pathetic. US Mail would have been faster!'
sp.3='That was pretty lousy.' ; sp.4='Needs work.' ; sp.5='(YAWN)'
sp.6='Not TOO bad.' ; sp.7='Getting there...' ; sp.8='Looks about right!'
sp.9='Zooming right along!' ; sp.10='Wow, pretty hot!' ; sp.11='Vroom!'
sp.12='Speed Demon!' ; sp.13='Broke the sound barrier on that one!'
sp.14='Outta Sight!' ; sp.15='Lord Almighty!' ; sp.16='Flaming Phone Lines!'
sp.17='Melting Modems!' ; sp.18='c9HOLY SHITcf!'
speed=sp.r ; if r<1 then speed=sp.1 ; if r>18 then speed=sp.18
do k=1 to 4+term ; do i=1 to length(cps) ; m=substr(cps,i,1)
line.k=line.k||n.m.term.k' ' ; end i ; line.k=line.k' c'c6||cps.term.k ; end k
tr 'f10Hc'c1'The average rate for this 'wd' wasc'c2':n1'
do i=1 to 4+term ; tr center(line.i,82) ; end i ; c9='c'c9
tr 'n1c'c2||center(speed,78)'n1' ; if c9='x' then c9=''
se 'Cc'c7'0c'c10'%>7c'c7'25c'c10'%>7c'c7'50c'c10'%>7c'c7
tr '75c'c10'%>6c'c7'100c'c10'%>6c'c7'125c'c10'%c'c11
do i=1 to 3 ; tr sh.term.i ; end i ; color=c12||c13||c14||c15||c16
se '^2>e' ; d=(rate*.4)%1 ; if d>49 then d=49 ; else if d<1 then d=1
do i=1 to d ; se 'c'substr(color,(i%10)+1,1)sh.term.4 ; end i
tr '>1'c9||rate'%n1' ; if cps<=hi then do
tr 'n1Cc'c3'The Record c'c5'CPS c'c3'at this Baud for c'c5||wd'ingc'c2': c'c8||left(hi,5)
tr 'Cc'c3'Set byc'c2': c'c8||who' c'c3'Onc'c2': c'c10||dateR'c'c3'!' ; exit ; end
if cps>hi then do ; tr 'n1Cc'c4'You broke the c'c5'CPS c'c4'Record for c'c5||wd'ing c'c4'ofc'c2': c'c8||left(hi,5)
tr 'Cc'c4'Set byc'c2': c'c8||who'c'c4' Onc'c2': c'c10||dateR'c'c4'!'
call open(f1,file,'w') ; call writeln(f1,cps'|'handle'|'date'|x') ; call close(f1)
tr 'n1Cc'c4'NEW c'c3'Record c'c5'CPS c'c3'at this Baud for c'c5||wd'ingc'c2': c'c8||left(cps,5)
tr 'Cc'c3'Set byc'c2': c'c8||handle' c'c3'Onc'c2': c'c10||dateL'c'c3'!' ; exit ; end
GETUPCPS:
call open(f1,file1,'r') ; do up=1 until eof(f1) ; up.up=readln(f1) ; end up
call close(f1) ; do i=up-1 to 1 by -1
parse var up.i 20 hdl.i 40 null 49 cps.i 53 null 70 len.i 74 null
hdl.i=strip(hdl.i) ; cps.i=strip(cps.i) ; len.i=strip(len.i)
if handle~=hdl.i then leave i ; if len.i>v2 & cps.i>cps then cps=cps.i
end i ; return
GETDOWNCPS:
call open(f1,file2,'r') ; do dn=1 until eof(f1) ; dn.dn=readln(f1) ; end dn
call close(f1) ; do i=dn-1 to 1 by -1
parse var dn.i 20 hdl.i 40 null 49 cps.i 53 null 70 len.i 74 null
hdl.i=strip(hdl.i) ; cps.i=strip(cps.i) ; len.i=strip(len.i)
if handle~=hdl.i then leave i ; if len.i>v2 & cps.i>cps then cps=cps.i
end i ; return
ASCII:
n.0.1.1=' ##### ' ; n.0.1.2='# ###' ; n.0.1.3='# # #' ; n.0.1.4='### #' ; n.0.1.5=' ##### '
n.1.1.1=' ## ' ; n.1.1.2='### ' ; n.1.1.3=' ## ' ; n.1.1.4=' ## ' ; n.1.1.5='####'
n.2.1.1=' ##### ' ; n.2.1.2='## ##' ; n.2.1.3=' ## ' ; n.2.1.4='### ' ; n.2.1.5='#######'
n.3.1.1=' ##### ' ; n.3.1.2='## ##' ; n.3.1.3=' ### ' ; n.3.1.4='## ##' ; n.3.1.5=' ##### '
n.4.1.1='## ## ' ; n.4.1.2='## ## ' ; n.4.1.3='#######' ; n.4.1.4=' ## ' ; n.4.1.5=' ## '
n.5.1.1='###### ' ; n.5.1.2='## ' ; n.5.1.3='###### ' ; n.5.1.4=' ##' ; n.5.1.5='###### '
n.6.1.1=' #### ' ; n.6.1.2=' ## ' ; n.6.1.3='###### ' ; n.6.1.4='## ##' ; n.6.1.5=' ##### '
n.7.1.1='#######' ; n.7.1.2=' ##' ; n.7.1.3=' ## ' ; n.7.1.4=' ## ' ; n.7.1.5=' ## '
n.8.1.1=' ##### ' ; n.8.1.2='## ##' ; n.8.1.3=' ##### ' ; n.8.1.4='## ##' ; n.8.1.5=' ##### '
n.9.1.1=' ##### ' ; n.9.1.2='## ##' ; n.9.1.3=' ######' ; n.9.1.4=' ## ' ; n.9.1.5=' #### '
cps.1.1=' ##### ###### ##### ' ; cps.1.2='## ## ## ## ## ' ; cps.1.3='## ###### ##### '
cps.1.4='## ## ## ##' ; cps.1.5=' ##### ## ##### ' ; sh.1.4='*' ; term=1
if v4=1 then do ; sh.1.1='C|-=-=-=-=|=-=-=-=-=|=-=-=-=-=|=-=-=-=-|-=-=-=-=-=|'
sh.1.2='C| | | | | |'
sh.1.3='C`-=-=-=-=`=-=-=-=-=`=-=-=-=-=`=-=-=-=-`-=-=-=-=-=|' ; end
else do ; sh.1.1='C=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-'
sh.1.2='C '
sh.1.3='C=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-' ; end ; return
ANSI:
n.0.0.1=' ▄▄▄▄▄ ' ; n.0.0.2='██ ▄██' ; n.0.0.3='██▄▀ ██' ; n.0.0.4='▀█▄▄▄█▀'
n.1.0.1=' ▄▄ ' ; n.1.0.2='▀██ ' ; n.1.0.3=' ██ ' ; n.1.0.4='▄██▄'
n.2.0.1=' ▄▄▄▄▄ ' ; n.2.0.2='▀▀ ██' ; n.2.0.3='▄█▀▀▀▀ ' ; n.2.0.4='██▄▄▄▄▄'
n.3.0.1=' ▄▄▄▄▄ ' ; n.3.0.2='▀▀ ██' ; n.3.0.3=' ▀▀█▄' ; n.3.0.4='▀█▄▄▄█▀'
n.4.0.1='▄▄ ▄▄' ; n.4.0.2='██ ██' ; n.4.0.3=' ▀▀▀▀██' ; n.4.0.4=' ██'
n.5.0.1='▄▄▄▄▄▄▄' ; n.5.0.2='██▄▄▄▄ ' ; n.5.0.3=' ██' ; n.5.0.4='▀█▄▄▄█▀'
n.6.0.1=' ▄▄▄ ' ; n.6.0.2='▄█▀ ' ; n.6.0.3='██▀▀▀█▄' ; n.6.0.4='▀█▄▄▄█▀'
n.7.0.1='▄▄▄▄▄▄▄' ; n.7.0.2=' ██' ; n.7.0.3=' ▄█▀ ' ; n.7.0.4=' ██ '
n.8.0.1=' ▄▄▄▄▄ ' ; n.8.0.2='██ ██' ; n.8.0.3='▄█▀▀▀█▄' ; n.8.0.4='▀█▄▄▄█▀'
n.9.0.1=' ▄▄▄▄▄ ' ; n.9.0.2='██ ██' ; n.9.0.3=' ▀▀▀▀██' ; n.9.0.4='▀█▄▄▄█▀'
cps.0.1=' ▄▄▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄ ' ; cps.0.2='██ ▀▀ ██ ██ ██ ▀▀' ; sh.0.4='█'
cps.0.3='██ ██▀▀▀▀ ▀▀▀▀█▄' ; cps.0.4='▀█▄▄▄█▀ ██ ▀█▄▄▄█▀' ; term=0
if v4=1 then do ; sh.0.1='C├────────┼─────────┼─────────┼────────┼──────────┤'
sh.0.2='C│ │ │ │ │ │'
sh.0.3='C├────────┴─────────┴─────────┴────────┴──────────┤' ; end
else do ; sh.0.1='C└────────┴─────────┴─────────┴────────┴──────────┘'
sh.0.2='C '
sh.0.3='C┌────────────────────────────────────────────────┐' ; end ; return
SYNTAX: ; ERROR: ; IOERR: ; gu 1311992 ; a=result ; gu 1311960 ; b=result
er='z4cf'a||b'z0 c9ERRORce: cb'rc' cf(ce'errortext(rc)'cf) c6'
er=er||'in line ca'sigl'c6.' ; tr 'n1'er ; logentry er ; bufferflush
/** END *******************************************************************\
\****************************************** FRONTIERS BBS (716)/823-9892 **/